﻿
#ifndef _APP_FUNCTION_
#define _APP_FUNCTION_


#include "Common.h"



/* 语言定义                                             */
#define LANGUAGE_NUMBER      2  // 当前支持“中文”和“英文”两种,可根据需要增加支持的语言。

#define LANGUAGE_CHINESE     0  // 中文
#define LANGUAGE_ENGLISH     1  // 英文
#define LANGUAGE_GERMAN      2  // 德文




/* 普通应用功能                                         */
#define NORMAL_MASK          0xFFF
#define WINDOW_NONE          0
#define SWITCH_ACTUATOR      1
#define DIMMER_ACTUATOR      2
#define SHUTTER_ACTUATOR     3
#define IO_BUTTON_SENSOR     4
//#define DIMMER_ACTUATOR      5
//#define DIMMER_ACTUATOR      6
//#define DIMMER_ACTUATOR      7
//#define DIMMER_ACTUATOR      8
//#define DIMMER_ACTUATOR      9
//#define DIMMER_ACTUATOR      10
//#define DIMMER_ACTUATOR      11
//#define DIMMER_ACTUATOR      12
#define TIME_FUNCTION        200
#define DATE_FUNCTION        201
#define SET_TIME_FUNCTION    202
#define LANGUAGE_FUNCTION    203
//#define CIPHER_SETTING       204



#define GROUP_CONTROL        301
#define GROUP_SET            302
#define GROUP_NAV3           303
#define GROUP_NAV4           304



#define ENCRYPTION_FUNCTION  0xF00          // 仅用于系统加密功能


/* 注意： 0xF01 - 0xFFF为子类型定义，由各特定应用自行定义。*/
#define SUB_TYPE             0xF01




/* 系统功能                                          */
#define SYSTEM_MASK          0xF000
#define JUMP_TO_WINDOW       0x1000          // 跳转到下一窗口
#define RETURN_FUNCTION      0x2000          // 返回上一窗口
#define HOME_FUNCTION        0x3000          // 跳转到主页






#if defined(__cplusplus)
extern "C" {     /* Make sure we have C-declarations in C++ programs */
#endif






uint8_t InitAppFunction(void);
void TimeCallback(void);
uint8_t CallFunction(pPARA_TCB pBase, pPARA_TCB pPara, uint8_t stage, uint32_t data);
void SetTimeBase(uint16_t year, uint16_t month, uint16_t day, uint16_t hour, uint16_t minute, uint16_t second);
void draw_line(void* pPara);


#if defined(__cplusplus)
}
#endif


#endif
